package com.netcracker.training.automonic.dao.entities;

/**
 * One of object properties that no change or change rarely.
 * 
 * <p>Each attribute has type that describes substance of attribute.
 * 
 * @author Vadim Gidulyan
 * 
 * @see Object
 * @see AttributeType
 */

public interface Attribute
{

	/**
	 * Returns attribute id.
	 * 
	 * @return attribute id
	 */
	int getId();
	
	/**
	 * Returns object that have this attribute.
	 * 
	 * @return object that have this attribute
	 */
	Object getObject();
	
	/**
	 * Returns type of the attribute.
	 * 
	 * @return type of the attribute
	 */
	AttributeType getType();
	
	/**
	 * Returns the attribute value.
	 * 
	 * @return attribute value
	 */
	String getValue();
	
	/**
	 * Sets the attribute value.
	 * 
	 * @param value attribute value. Length of string must not exceed 255 
	 * symbols
	 */
	void setValue(String value);
	
	/**
	 * Saves object to database.
	 */
	void save();

}
